
<?php 
include('includes/dbconnection.php');

$q=$_GET["q"];
 
 $qry ="SELECT j.category,js.id id,js.sub_cat_name,js.desc,js.active_status from 
job_subcategory js INNER JOIN job_category j ON j.id=js.category_id
						where j.id='".$q."' order by j.id desc";
$res = mysql_query($qry);


if(mysql_num_rows($res)>0)
	 {
		 while($data=mysql_fetch_array($res)) 
		{
			$str .='<option value="'.$data['id'].'" selected>'.$data['sub_cat_name'].'</option>';
	    echo $str;
		}
		
	}
	else
	{
	 	$str	.='<option value="No Data Found"></option>';
		echo 	$str;
	}
 
?> 
	
    